﻿
#region Using Directives

    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Xml.Linq;

#endregion

namespace MarketPulse.BusinessLogic.Common.StateMachine
{
    internal interface IEnquiryStateContext
    {
        /// <summary>Method used to set the current state of the state machine.</summary>
        /// <param name="visitState">The new state to become the current state.</param>
        void SetState(IEnquiryState visitState);

        /// <summary>Method used to set the current state of the state machine.</summary>
        /// <returns>The current state</returns>
        IEnquiryState GetState();

        /// <summary>
        /// This method interrogates the current internal state to ascertain
        /// if the event in question causes a valid state transition.
        /// </summary>
        /// <param name="eventName">The name of the event (method)</param>
        /// <returns></returns>
        bool CanTransition(string eventName);

        /// <summary>
        /// Method used to accept the enquiry as valid
        /// </summary>
        bool Accept(bool tryTransition);

    }
}
